//
//  ContainerView.h
//  宜居2
//
//  Created by 张金国-X on 16/3/8.
//  Copyright © 2016年 张金国-X. All rights reserved.
//

#import <UIKit/UIKit.h>

@protocol ContainerViewLocationDelegate <NSObject>

@optional
/**
 *  @author X
 *
 *  处理容器视图的缩放事件
 *
 *  @param ratio 容器视图占整个屏幕的高度比
 *  @param containerView 容器视图
 */
-(void)handleScaleEventResponseWithRatio:(CGFloat)ratio andContainerView:(UIView *)containerView;

@end

@protocol ContainerViewNaviDelegate <NSObject>

@required
/**
 *  @author X
 *
 *  处理容器视图的跳转事件
 *
 *  @param itemTag 点击的item的tag
 */
-(void)handleNaviEventResponseWithItemTag:(NSInteger)itemTag;

@end

@interface ContainerView : UIView
/**内部容器视图view的边距*/
@property (nonatomic ,assign)CGFloat margin;
/**内部容器视图view*/
@property (nonatomic, strong)UIView *view;
/**整个容器视图containerView占整个屏幕的高度比*/
@property (nonatomic, assign)CGFloat ratio;
/**
 *  是否自适配高度
 */
@property (nonatomic, assign) Boolean isAutoSize;
/**子视图要实现的代理*/
@property (nonatomic,weak)id<ContainerViewLocationDelegate> delegate;
@property (nonatomic,weak)id<ContainerViewNaviDelegate>     naviDelegate;
@end
